<template>
    <el-row type="flex">
      <el-col :span="elColSpan[0]">
        <!-- 插槽左侧 -->
        <slot name="left">
          <el-tag v-if="isShowLeftTag"><i class="el-icon-info" />{{ cardHeaderLeft }}</el-tag>
        </slot>
      </el-col>
      <el-col :span="elColSpan[1]" class="col-right">
        <!-- 插槽右侧 -->
        <slot name="right" />
      </el-col>
    </el-row>
</template>

<script>
export default {
  components: {

  },
  props: {
    // 头部tip提示，默认为''
    cardHeaderLeft: {
      type: String,
      default: ''
    },
    // 是否显示头部左侧提示tag，默认显示
    isShowLeftTag: {
      type: Boolean,
      default: true
    },
    // 数组，两边的宽度对比
    elColSpan: {
      type: Array,
      default: () => [12, 12]
    }
  },
  data () {
    return {

    }
  },

  created () {

  },
  methods: {

  }
}
</script>

<style scoped lang='scss'>
.col-right{
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}
</style>
